home *** CD-ROM | disk | FTP | other *** search
- * LIBFIX.PRG
- * Program to replace all occurrences
- * of CLIPPER501
- * with CLIPPER520
-
- …ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª
- ∫ This program can be used to replace all occurrences of one series ∫
- ∫ of characters or bytes with the contents of another series. ∫
- ∫ ∫
- ∫ This program is currently compiled to solve a problem with upgrading ∫
- ∫ third party libraries from Clipper 5.01 to Clipper 5.2. ∫
- ∫ ∫
- ∫ The symbol CLIPPER501 in many libraries needs to be changed to ∫
- ∫ CLIPPER520. This can be accomplished using this program instead of ∫
- ∫ recompiling all of the libraries. ∫
- ∫ ∫
- ∫ I suggest first rename the old library with an extension of: *.L50 ∫
- ∫ The program will prompt for the file names for input and output. ∫
- ∫ ∫
- ∫ File names may also be entered on the command line as: ∫
- ∫ LIBFIX <Input file> <Output file> ∫
- ∫ Example: ∫
- ∫ LIBFIX NANFOR.L50 NANFOR.LIB ∫
- »ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº
-
- I am not really familiar with why the symbols CLIPPER501 and CLIPPER520 exist,
- but libraries that were compiled with Clipper version 5.01 may not work (link)
- with CA-Clipper 5.2 without modifications.
-
- I found that simply changing the characters "01" to "20" with a hex editor
- worked fine. I have several third party libraries that I won't be able to
- get easily recompiled (the manufactures may even want an upgrade fee!).
- So I wrote this program to deal with the larger libraries (my copy of
- NANFOR.LIB had 106 changes to be made).
-
- This program worked on NANFOR.LIB and several other libraries that I have.
-
- Again, I recommend that you keep a copy of the original library. I renamed
- all of my original libraries to have extensions of .L50 before running this
- program.
-
- ==============================================================================
- ALSO:
-
- The way that I wrote this program it can be used as a global search & replace
- for ANY binary or ASCII file. I have frequently needed just such utility in
- the past.
-
- Just edit lines 17 and 18 to contain the "before" and "after" characters.
- Currently those lines are:
- old_str = "CLIPPER501"
- new_str = "CLIPPER520"
-
- The only real requirement, based on the way I wrote the program, is that both
- the "before" and "after" (old & new) must be exactly the same length.
-
- The stings can be any ASCII characters, just build up the stings using the
- CHR() function. For example, to swap carriage return / linefeed codes when
- they are in reverse order you could use:
- old_str = CHR(10) + CHR(13)
- new_str = CHR(13) + CHR(10)
-
- ==============================================================================
-
- This code is released to public domain.
-
- Jerry Wightman
- CompuServe 71075,457
- or 71545,1244
-